<template>
	<u-popup :show="value" @close="close">
		<view>
			<u-button @click="goPage">修改用户名与头像</u-button>
			<u-button @click="logOut">退出登录</u-button>
		</view>
	</u-popup>
</template>

<script>
	import {
		mapActions
	} from 'vuex'
	export default {
		props: {
			value: {
				type: Boolean,
				default: false
			}
		},
		methods: {
			...mapActions(['userLogOut']),
			close() {
				this.$emit("input",false)
			},
			goPage() {
				this.close()
				this.pushNewPage("avatar")
			},
			logOut() {
				this.close()
				this.userLogOut()
			}
		}
	}
</script>

<style>
</style>
